home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 3: Developer Tools
/
Linux Cubed Series 3 - Developer Tools.iso
/
devel
/
make
/
icmake-6.000
/
icmake-6
/
icmake
/
comp
/
negate.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-02-08
|
577 b
|
24 lines
/*
N E G A T E . C
*/
#include "iccomp.h"
ESTRUC_ *negate(ESTRUC_ *e) /* expression so far */
{
if (test_operand(e, op_umin)) /* test types ok */
{
semantic(illegal_type, opstring[op_umin]);
return (e);
}
if (e->type & e_const) /* immediate value */
(int)e->evalue = -(int)e->evalue;
else
{
etoc(e); /* convert to code */
gencode(e, op_umin); /* generate instruction */
}
return (e);
}